import 'package:get/get.dart';
import 'package:grocery_app_demo/constants/image_constant.dart';
import 'package:grocery_app_demo/widgets/common_image_view.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'controller.dart';
import 'package:flutter/material.dart';

class SplashScreen extends GetWidget<SplashController> {
  const SplashScreen({super.key});

  @override
  Widget build(BuildContext context) {
    Get.put(SplashController());
    
    return Scaffold(
        backgroundColor: Colors.white,
        body: ConstrainedBox(
          constraints: const BoxConstraints.expand(),
          child: Stack(
            alignment: Alignment.center,
            children: <Widget>[
              Positioned(
                top: 658.h,
                child: CommonImageView(
                  imagePath: ImageConstant.logo,
                  width: 166.w,
                  height: 166.h,
                ),
              ),
              Positioned(
                top: 269.h,
                right: -113.w,
                child: CommonImageView(
                  imagePath: ImageConstant.splashScreenCircular,
                  width: 405.w,
                  height: 405.h,
                ),
              ),
              Positioned(
                top: 772.h,
                left: 166.w,
                child: CommonImageView(
                  imagePath: ImageConstant.splashScreenCircular2,
                  width: 80.w,
                  height: 80.h,
                ),
              ),
              Positioned(
                bottom: 103.h,
                child: CommonImageView(
                  imagePath: ImageConstant.meiwei,
                  width: 156.w,
                ),
              ),
            ],
          ),
        ));
  }
}
